package com.chixing.day06.StaticDemo;

public class StudentTest {
    static {
        System.out.println("static代码快 100");
    }

    public static int a = 10; //类变量 Student.a [共享数据区]
    public int b = 20;  //实例变量 Student stu1 = new Student();  stu1.b;
    public int c;      //c默认值0
    public static StudentTest stu = new StudentTest(); //声明引用数据类型变量,创建对象后先执行普通代码块、构造函数、static、普通代码块、构造函数

    static {
        System.out.println("static代码快 200 ");
    }

    public StudentTest() {
        System.out.println("无参构造函数");
    }

    //构造块、普通代码块（几乎不用）
    {
        System.out.println("构造块");
    }
}
